package role

import "gin_demo/internal/model"

type AddRoleReq struct {
	Name string `json:"name" binding:"required"`
	Desc string `json:"desc"`
}

type UpdateRoleReq struct {
	Id   uint   `json:"id" binding:"required"`
	Name string `json:"name" binding:"required"`
	Desc string `json:"desc"`
}

type SoftDeleteReq struct {
	Id int `json:"id" binding:"required"`
}

type PageList struct {
	Page  int `json:"page" binding:"required"`
	Limit int `json:"limit" binding:"required"`
}

type RoleRes struct {
	Count int64 `json:"count"`
	List  []model.Role
}

/*给角色添加权限*/

type RoleAddPermission struct {
	RoleId       uint `json:"role_id"`
	PermissionID uint `json:"permission_id"`
}

type RoleSoftDeletePermission struct {
	RoleId       uint `json:"role_id"`
	PermissionID uint `json:"permission_id"`
}

type RolePermissions struct {
	Id         uint   `json:"id"`
	Role       string `json:"role"`
	Permission string `json:"permission"`
}

type RolePermissionRes struct {
	Count int64 `json:"count"`
	List  []RolePermissions
}
type RoleUpdatePermission struct {
	Id           uint `json:"id"`
	RoleId       uint `json:"role_id"`
	PermissionID uint `json:"permission_id"`
}
